package com.wizhong.os.printimage.service;

import android.graphics.BitmapFactory;
import android.os.Environment;
import android.test.AndroidTestCase;
import android.util.Log;

import com.wizhong.os.printimage.PaperSize;

public class TestImageService extends AndroidTestCase {
	private final String LOG_TAG = "TestImageService";

	String imgFilePath = Environment.getExternalStorageDirectory().toString()
			+ "/DCIM/Camera/IMG_20110101_160014.jpg";

	public void testPhotoToPostscript() throws Exception {

		PaperSize mPaperSize = PaperSize.PAERSIZE_4_INCH;

		Log.i(LOG_TAG, "Width: " + mPaperSize.getWidth() + " Heigth: "
				+ "Width: " + mPaperSize.getHeight());
		ImageService.imageToPDF(BitmapFactory.decodeFile(imgFilePath),
				"/sdcard/tmp.pdf", true, true, mPaperSize.getWidth(),
				mPaperSize.getHeight());
	}
	
	public void testIsPicture() throws Exception {
		String imgFilePath = "/sdcard/IMG_20110101_160014.jpg";
		ImageService.isPicture(imgFilePath);
	}


}
